a=int(input())
b=int(input())
print(a+b)
print(a-b)
print(a*b)
print((a+b)/2)
print(abs(a-b))
print(min(a,b))
print(max(a,b))

